package JLB_Chapter_05;
// StringLastIndex
public class code_05_07 {
    public static void main(String[] args) {
        String str = "Let it go!Let it go!";
        int gIndex = str.lastIndexOf("g",11);
        int goIndex = str.lastIndexOf("go");
        int oIndex = str.lastIndexOf("o");
        System.out.println("字符串\"Let it go!Let it go!\"中:\n");
        System.out.println("\"g\"最后一次出现的位置是：" + gIndex);
        System.out.println("\"o\"最后一次出现的位置是：" + oIndex);
        System.out.println("\"go\"最后一次出现的位置是：" + goIndex);
    }
}
